//
//  BPPictureView.swift
//  BPWeiBo
//
//  Created by apple on 16/4/13.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit

class BPPictureView: NSObject {
    
    var thumbnail_pic:String?
    //var original_pic:String?
    //var bmiddle_pic:String?
    
    init(dict:[String : AnyObject]) {
        super.init()
        setValuesForKeysWithDictionary(dict)
    }
    
    //MARK:设置高清图片
    override func setValue(value: AnyObject?, forKey key: String) {
        let largeStr = (value as! String).stringByReplacingOccurrencesOfString("thumbnail", withString: "bmiddle")
        super.setValue(largeStr, forKey: key)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    
    //将对象转换成字符串,当我们需要的时候打印这个对象,原本是地址,写这个方法过后就是字符串了
    override var description: String {
    let keys = [""]
    let dict = self.dictionaryWithValuesForKeys(keys)
    return dict.description
    
    }
    
    

}
